const { openLink } = require("../../utils/link")

// pages/mine/mDetail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    detail:{},
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const event =  this.getOpenerEventChannel()
    const that = this
    const wec = wx
    event.on("meetingData" , function(data) {
      that.setData({detail: data})
      wec.setNavigationBarTitle({
        title: data.meeting.meetingName
      })
    })
  },

  onLink(e){
    const {link} = e.currentTarget.dataset
    openLink(link)
  },
})